<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改产品')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" th:width="300px">
	<form class="form-horizontal m" id="form-post-add" th:object="${proManager}">

		<input id="managerId" name="managerId" type="hidden" th:field="*{managerId}"/>
		<div class="form-group">
			<label class="col-sm-3 control-label">型号：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="managerType" id="managerType" th:field="*{managerType}" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">品名：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="managerName" id="managerName" th:field="*{managerName}" required>
			</div>
		</div>


		<div class="form-group">

			<div class="col-md-12">
				<div class="form-group">
					<label class="col-sm-3 control-label">类别:</label>
					<div class="col-sm-9">
						<select class="form-control" name="classesId">
							<option th:each="proClassesVo:${proClassesVos}" th:value="${proClassesVo.classesId}"  th:selected="${proManager.classesId eq proClassesVo.classesId}">[[${proClassesVo.classesName}]]</option>
						</select>

					</div>
				</div>
			</div>

		</div>

		<div class="form-group">

			<div class="col-md-12">
				<div class="form-group">
					<label class="col-sm-3 control-label">规格:</label>
					<div class="col-sm-9">
						<select class="form-control" name="sizeId">
							<option th:each="proSizeVo:${proSizeVos}" th:value="${proSizeVo.sizeId}"  th:selected="${proManager.sizeId eq proSizeVo.sizeId}">[[${proSizeVo.sizeName}]]</option>
						</select>

					</div>
				</div>
			</div>

		</div>
		<!--系列-->
		<div class="form-group">

			<div class="col-md-12">
				<div class="form-group">
					<label class="col-sm-3 control-label">系列</label>
					<div class="col-sm-9">
						<select class="form-control" name="lineId">
							<option th:each="prolineVo:${proLineVos}" th:value="${prolineVo.lineId}" th:selected="${proManager.lineId eq prolineVo.lineId}">[[${prolineVo.lineName}]]</option>
						</select>

					</div>
				</div>
			</div>

		</div>
		<!--风格-->

		<div class="form-group">

			<div class="col-md-12">
				<div class="form-group">
					<label class="col-sm-3 control-label">风格</label>
					<div class="col-sm-9">
						<select class="form-control" name="styleId">
							<option th:each="proStyleVo:${proStyleVos}" th:value="${proStyleVo.styleId}"  th:selected="${proManager.styleId eq proStyleVo.styleId}">[[${proStyleVo.styleName}]]</option>
						</select>

					</div>
				</div>
			</div>

		</div>
		<!--材质-->
		<div class="form-group">

			<div class="col-md-12">
				<div class="form-group">
					<label class="col-sm-3 control-label">材质</label>
					<div class="col-sm-9">
						<select class="form-control" name="textureId">
							<option th:each="proTextureVo:${proTextureVos}" th:value="${proTextureVo.textureId}"  th:selected="${proManager.textureId eq proTextureVo.textureId}">[[${proTextureVo.textureName}]]</option>
						</select>

					</div>
				</div>
			</div>

		</div>


		<div class="form-group">
			<label class="col-sm-3 control-label">产地：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="managerPlace" id="managerPlace"  th:field="*{managerPlace}"required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label ">单价：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="managerPrice" id="managerPrice"  th:field="*{managerPrice}" required>
			</div>
		</div>


		<div class="form-group">
			<label class="col-sm-3 control-label ">数量：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name=" managerNum" id="managerNum"  th:field="*{managerNum}" required>
			</div>
		</div>
		<img th:src="@{${picturePath}}"/>
		<!--<a th:href="@{${proManager.managerPicture}}">查看图片</a>-->

	</form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
	var prefix = ctx + "pro/manager";
	$("#imgId").attr("src","https://tcr-5cb5kifq-1302869269.cos.ap-guangzhou.myqcloud.com/sofa01.jpg");


	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/edit", $('#form-post-add').serialize());
		}
	}
</script>
</body>
</html>
